package com.minelx.serverandclient.common;

import java.io.IOException;
import java.io.InputStream;

public class Bytes {
	private final byte[] source;

	private int absorbedCount;

	public Bytes(byte[] source) {
		this.source = source;
	}

	public void absorb(InputStream target) throws IOException {
		absorbedCount = target.read(source);
	}

	public byte[] getBytes() {
		return source;
	}

	public int absorbedCount() {
		return absorbedCount;
	}
}
